package com.lkl.demo.common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@AllArgsConstructor
@ToString
public enum ResponseEnum {

    SUCCESS(0, "成功"),
    ERROR(-1, "服务器内部错误"),

    SERVLET_ERROR(-102, "servlet请求异常"),

    //登录模块5002xx
    SESSION_ERROR(500210, "session不存在或者已经失效"),
    LOGIN_ERROR(500211, "用户名或者密码错误"),
    BIND_ERROR(500212, "参数校验异常"),
    LOGINVO_NULL_ERROR(500213, "用户名或者密码不能为空"),
    MOBILE_ERROR(500214, "手机号码格式错误")  ,  //秒杀模块


    EMPTY_STOCK(500500, "库存不足"),
    REPEAT_ERROR(500501, "该商品每人限购一件"),
    REQUEST_ILLEGAL(500502, "请求非法，请重新尝试"),
    ERROR_CAPTCHA(500503, "验证码错误，请重新输入"),
    ACCESS_LIMIT_REACHED(500504, "访问过于频繁，请稍后重试"),
    //订单模块5003xx
    ORDER_NOT_EXIST(500300, "订单不存在"),
    ;

    // 响应状态码
    private final Integer code;
    // 响应信息
    private final String message;
}
